package di

import (
	"fmt"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/aggregation/statistics"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/base/area"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/base/menu"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/base/msg"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/base/org"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/base/permission"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/base/profit"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/base/role"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/base/site"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/base/user"
	userService "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/base/user"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/business_opportunity/bid"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/business_opportunity/contact"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/business_opportunity/customer"
	commonImpl "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/business_opportunity/oppty_status"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/business_opportunity/order"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/business_opportunity/project"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/business_opportunity/strategic_monitor"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/business_opportunity/subscription"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/clue/clue"
	customerImpl "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/clue/customer"
	report2 "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/clue/report"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/common/dmp_report"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/common/file"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/common/form"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/common/option"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/common/verify_code"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/job_center"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/market/outbound_account"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/market/outbound_crowd"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/market/outbound_task"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/service/rpa"
)

func (c *Inject) InjectService() {
	services := []interface{}{
		area.NewAreaService,
		clue.NewClueService,
		commonImpl.NewOpptyStatusService,
		contact.NewContactService,
		customer.NewBusinessCustomerService,
		customerImpl.NewCustomerManageService,
		dmp_report.NewDmpReportService,
		file.NewFileService,
		form.NewFormService,
		job_center.NewJobCenterService,
		menu.NewMenuService,
		option.NewOptionService,
		order.NewOrderService,
		org.NewOrgService,
		msg.NewMsgService,
		outbound_account.NewOutboundAccountService,
		outbound_crowd.NewOutboundCrowdService,
		outbound_task.NewOutboundTaskService,
		permission.NewPermissionService,
		profit.NewProfitService,
		report2.NewReportService,
		role.NewRoleService,
		rpa.NewRpaService,
		site.NewSiteService,
		subscription.NewSubscriptionService,
		user.NewUserService,
		userService.NewLoginService,
		verify_code.NewVerifyCodeService,
		project.NewProjectService,
		project.NewBuildingService,
		statistics.NewStatisticsService,
		bid.NewBidService,
		strategic_monitor.NewStrategicMonitorService,
	}
	var errs []error
	for _, constructor := range services {
		err := c.Provide(constructor)
		if err != nil {
			errs = append(errs, err)
		}
	}
	fmt.Printf("InjectService errors:%+v\n", errs)
}
